
u9ImHd.registerModule('DevHelp', [])

    .config(['$stateProvider', '$ocLazyLoadProvider', function ($stateProvider, $ocLazyLoadProvider) {
        $stateProvider
            .state('DevHelp', {
                url: '/DevHelp',
                templateUrl: u9ImHd.getFullPath('tpls/home.html', 'DevHelp'),
                controller: 'DevHelp.HomeCtrl',
                resolve: {
                    loadFile: ['$q', '$ocLazyLoad', function($q, $ocLazyLoad) {
                        var defer = $q.defer();
                        
                        $ocLazyLoad.load(['angular-cookies', 'DevHelpFile']).then(function () {
                            angular.module('DevHelp').requires.push('ngCookies');
                            defer.resolve();
                        }, function () {
                            defer.reject();
                        });

                        return defer.promise;
                    }]
                }
            })
            .state('DevHelp-detail', {
                url: '/DevHelp-detail?navItemId:summaryId',
                templateUrl: u9ImHd.getFullPath('tpls/detail.html', 'DevHelp'),
                controller: 'DevHelp.DetailCtrl'
            });

        $ocLazyLoadProvider.config({
            modules: [{
                name: 'angular-cookies',
                files: [
                    u9ImHd.getFullPath('lib/angular-cookies/angular-cookies.js', 'DevHelp')
                ]
            }, {
                name: 'DevHelpFile',
                files: [
                    u9ImHd.getFullPath('js/controllers/DevHelp.HomeCtrl.js', 'DevHelp'),
                    u9ImHd.getFullPath('js/controllers/DevHelp.DetailCtrl.js', 'DevHelp'),
                    u9ImHd.getFullPath('js/services/DevHelpNav.js', 'DevHelp'),
                    u9ImHd.getFullPath('js/utility/DEVHELPCONSTANTS.js', 'DevHelp')
                ]
            }]
        });
    }]);
